<?php

namespace App\Constant;

class Enum
{
    const STATUS_ENABLED = 'enabled';
    const STATUS_DISABLED = 'disabled';
    const STATUS_BLOCKED = 'blocked';

    const WITHDRAW_STATUS_PENDING = 'pending';
    const WITHDRAW_STATUS_REJECTED = 'rejected';
    const WITHDRAW_STATUS_APPROVED = 'approved';

    const ADREWARD_DETAIL_COLLECT_STATUS_PENDING = 'pending';
    const ADREWARD_DETAIL_COLLECT_STATUS_APPROVED = 'approved';
    const ADREWARD_DETAIL_COLLECT_STATUS_REJECTED = 'rejected';

    const WALLET_TYPE_COMMISSION = 'commission';
    const WALLET_TYPE_TASK = 'task';
    const WALLET_TYPE_REWARD = 'reward';
    const WALLET_TYPE_REFUND = 'refund';
    const WALLET_TYPE_RETURN = 'return';

    const WALLET_TYPE_BOTH = 'both';
    const WALLET_TYPE_WITHDRAW = 'withdraw';

    const WALLET_ACTIVE_STATUS_PENDING = 'pending';
    const WALLET_ACTIVE_STATUS_REJECT = 'reject';
    const WALLET_ACTIVE_STATUS_APPROVED = 'approved';

    const WALLET_ACTIVE_ACTION_INCOME = 'income';
    const WALLET_ACTIVE_ACTION_OUTCOME = 'outcome';

    const ADTYPE_POSITION_SHORTS = 'shorts';
    const ADTYPE_POSITION_STIMULATE = 'stimulate';
    const ADTYPE_POSITION_BANNER = 'banner';
    const ADTYPE_POSITION_STREAM = 'stream';
    const ADTYPE_POSITION_INTERRUPT = 'interrupt';
    const ADTYPE_POSITION_OPENSCENE = 'openscene';

    const TRANSACTION_STATUS_PENDING = 'pending';
    const TRANSACTION_STATUS_REJECT = 'reject';
    const TRANSACTION_STATUS_APPROVED = 'approved';

    public static function getWithdrawStatusExplain($status): string
    {
        $explains = [
            self::WITHDRAW_STATUS_PENDING => '审核中',
            self::WALLET_ACTIVE_STATUS_REJECT => '提现失败',
            self::WALLET_ACTIVE_STATUS_APPROVED => '提现成功'
        ];

        return $explains[$status] ?? '-';
    }


    public static function getAdtypePositionExplains(): array
    {
        return [
            self::ADTYPE_POSITION_SHORTS => '短视频',
            self::ADTYPE_POSITION_STIMULATE => '激励视频',
            self::ADTYPE_POSITION_BANNER => 'Banner',
            self::ADTYPE_POSITION_STREAM => '信息流',
            self::ADTYPE_POSITION_INTERRUPT => '插屏',
            self::ADTYPE_POSITION_OPENSCENE => '开屏',
        ];
    }

    public static function getStatusExplains(): array
    {
        return [
            self::STATUS_ENABLED => '启用中',
            self::STATUS_BLOCKED => '封禁中'
        ];
    }

    public static function getSelectableStatusExplains(): array
    {
        return [
            self::STATUS_ENABLED => '启用',
            self::STATUS_DISABLED => '禁用',
        ];
    }
}
